<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');

/*
 * 边栏模型管理
 */
class Aside_model extends CI_Model{
//获取边栏
	public function __getAside($_id){
		$whereCondition="where ";
		$whereCondition.=($_id!=0)?("category_name={$_id}"):("1=1");
		$sql="select * from {$this->tableName} {$whereCondition}";
		$sql.=" order by id desc limit 0,1";
		$resData=$this->db->query($sql)->result_array();
		return $resData;
	}
}